package com.lazyfish.Aspect;

import org.aspectj.lang.annotation.AfterReturning;
import org.aspectj.lang.annotation.Aspect;
import org.aspectj.lang.annotation.Before;
import org.aspectj.lang.annotation.Pointcut;
import org.springframework.stereotype.Component;

import java.util.Date;

@Aspect
@Component
public class birdsAspect {
    @Pointcut("execution(* com.lazyfish.birds.*.*(..))")
    private void myPointCut(){}
    @Before("myPointCut()")
    public void check(){
        System.out.println("起飞前检测");
    }
    @AfterReturning("myPointCut()")
    public void log(){
        System.out.println("鸟哥下降时间："+new Date());
    }
}
